package com.sfgeeq.web;

import com.sfgeeq.exception.MyException;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created by vmuser010 on 2016/11/4.
 */
@RestController
public class HelloController {
    @RequestMapping("/hello")
    public String index() {
        return "Hello World";
    }

    @RequestMapping("/helloTwo")
    public String hello()throws Exception{
        throw new Exception("发生异常123");
    }


    @RequestMapping("/json")
    public String json() throws MyException {
        throw new MyException("发生错误2");
    }

}
